
<div class="wrapper-md" ng-controller="MyBillCtrl">
	<div class="panel panel-default">
		<div class="panel-heading">票据列表</div>

		<table st-table="rowCollectionPage" class="table table-striped">
			<thead>
			<tr>
				<th>票据号</th>
				<th>票据状态</th>
				<th>所属关系</th>
				<th>操作</th>
			</tr>

			</thead>
			<tbody>
			<tr ng-repeat="row in rowCollectionPage">
				<td>{{row.BillInfoID}}</td>
				<td>
					<div ng-show="row.State == 'NewPublish'">新发布</div>
					<div ng-show="row.State == 'EndrWaitSign'">背书待签收</div>
					<div ng-show="row.State == 'EndrSigned'">背书已签收</div>
					<div ng-show="row.State == 'EndrReject'">背书已拒收</div>
				</td>
				<td>
					<div ng-show="row.State == 'NewPublish'">当前持有</div>
					<div ng-show="row.State == 'EndrWaitSign' && row.HodrCmID == loginuser.cmId">当前持有,待{{row.WaitEndorserAcct}}背书签收</div>
					<div ng-show="row.State == 'EndrWaitSign' && row.WaitEndorserCmID == loginuser.cmId">待{{row.WaitEndorserAcct}}背书签收</div>
					<div ng-show="row.State == 'EndrSigned'  && row.HodrCmID == loginuser.cmId">当前持有</div>
					<div ng-show="row.State == 'EndrReject'">当前持有，背书已拒收</div>
				</td>
				<td><button class="btn m-b-xs w-xs btn-success" ng-click="view(row)">详情</button></td>
			</tr>
			</tbody>
			<tfoot>
			<tr>
				<td colspan="5" class="text-center">
					<div st-pagination="" st-items-by-page="itemsByPage" st-displayed-pages="7" class="no-margin"></div>
				</td>
			</tr>
			</tfoot>
		</table>

		<script type="text/ng-template" id="myBillInfo.html">
			<div ng-include="'tpl/modal_billInfo.html'"></div>
		</script>
	</div>
</div>

